package com.hx.strategy.promotion;

/**
 * @author Huathy
 * @date 2021-08-30 22:06
 * @description
 */
public class PromotionAcitvityTest {
    public static void main(String[] args) {
        PromotionAcitvity acitvity618 = new PromotionAcitvity(new CouponStrategy());
        PromotionAcitvity acitvity11 = new PromotionAcitvity(new CashbackStrategy());
        String activity = "COUPON";
//        if("COUPON".equals(activity)){
//            acitvity11.execute();
//        }else if("CASHBACK".equals(activity)){
//            acitvity618.execute();
//        }
        PromotionAcitvity promotionAcitvity = new PromotionAcitvity(
                PromotionStrategyFacotry.getPromotionStrategy(activity));
        promotionAcitvity.execute();
    }
}
